import RnButton from 'components/RnButton';
import React from 'react';
import {Image, StyleSheet, Text, View} from 'react-native';
import {EventType, User} from 'types';
import dayjs from 'dayjs';
import {useSelector} from 'react-redux';
import {selectLangSetting, selectUser} from 'reduxState/selectors';
import lang from 'lang';
interface UserPropsType {
  creator?: User;
}

interface PropsType {
  detailInfo?: EventType;
}
export default function DetailSummary(props: PropsType) {
  const {detailInfo} = props;
  const user = useSelector(selectUser);
  return (
    <View style={styles.container}>
      <Image style={styles.avatar} source={{uri: user?.avatar}} />
      <Text style={styles.userName}>{user?.username}</Text>
      <Text style={styles.email}>{user?.email}</Text>
    </View>
  );
}
const styles = StyleSheet.create({
  container: {
    paddingTop: 36,
    paddingBottom: 24,
    backgroundColor: '#fff',
    alignItems: 'center',
  },
  avatar: {
    width: 72,
    height: 72,
    borderRadius: 36,
  },
  userName: {
    marginTop: 24,
    fontSize: 24,
    color: '#67616D',
  },
  email: {
    marginTop: 14,
    fontSize: 14,
    color: '#8560A9',
  },
});
